chore: 增加滚动区域滚轮滚动到顶部或底部的回弹效果 - #596
Merged
Merged
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Whale107 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
deepin-ci-robot
added a commit
to linuxdeepin/dtk6widget
that referenced
this pull request
Aug 5, 2024
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#596
Contributor
|
Doc Check bot
|
kegechen
reviewed
Aug 9, 2024
| return; | ||
|
|
||
| d->m_animationTarget = w; | ||
|
|
kegechen
reviewed
Aug 9, 2024
| if (!w) | ||
| return; | ||
|
|
||
| w->installEventFilter(this); |
Contributor
There was a problem hiding this comment.
有 install 应该有 uninstall 的逻辑,比如 if (d->m_animationTarget != w)
kegechen
reviewed
Aug 9, 2024
|
|
||
| QTimer::singleShot(100, this, [this, d, orientation]() { | ||
|
|
||
| orientation & Qt::Vertical |
Contributor
There was a problem hiding this comment.
不用 if else 的理由是啥, 这样可读性更差。。。
kegechen
reviewed
Aug 9, 2024
| DObject(*new DListViewPrivate(this)) | ||
| { | ||
| d_func()->init(); | ||
| auto animation = new DBounceAnimation(this); |
Contributor
There was a problem hiding this comment.
可以加一个环境变量禁用这种动画的。 类似 if (!qEnvironmentVariableIsSet("DTK_DISABLE_LISTVIEW_ANIMATION"))
kegechen
reviewed
Aug 12, 2024
| public: | ||
| explicit DBounceAnimation(QObject *parent = nullptr); | ||
|
|
||
| void setAnimationTarget(QAbstractScrollArea *w); |
Contributor
There was a problem hiding this comment.
可以加一个 setEnable 接口方便用户禁用启用
增加滚动区域滚轮滚动到顶部或底部的回弹效果 Log:
deepin-ci-robot
added a commit
to linuxdeepin/dtk6widget
that referenced
this pull request
Aug 12, 2024
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#596
Contributor
deepin pr auto review关键摘要:
是否建议立即修改: |
Whale107
added a commit
to Whale107/dtkwidget
that referenced
this pull request
Sep 23, 2024
增加滚动区域滚轮滚动到顶部或底部的回弹效果 Log:
deepin-bot Bot
pushed a commit
that referenced
this pull request
Sep 23, 2024
增加滚动区域滚轮滚动到顶部或底部的回弹效果 Log:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
增加滚动区域滚轮滚动到顶部或底部的回弹效果
Log: